//
//  NSString+AddNumber.m
//  CategoryAddAttribute
//
//  Created by 蓓蕾 on 2023/10/27.
//

#import "NSString+AddNumber.h"
#import <objc/runtime.h>

static NSString *customerNumberKey = @"customerNumberKey";

@implementation NSString (AddNumber)

- (void)setCustomerNumber:(NSUInteger)customerNumber{
    objc_setAssociatedObject(self, &customerNumberKey, @(customerNumber), OBJC_ASSOCIATION_ASSIGN);
}

- (NSUInteger)customerNumber{
    NSNumber *number = objc_getAssociatedObject(self, &customerNumberKey);
    return [number integerValue];;
}

@end
